package org.smr.ministore.micro.client;

import java.util.List;

import org.blade.utils.Pager;
import org.smr.ministore.entities.OrganInfo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient("auth.OrganInfo")
public interface FeignOrganInfoMicroServiceClient {

    @RequestMapping(method = RequestMethod.POST, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/batchSave")
    int batchSave(@RequestBody List< OrganInfo> entities);

    @RequestMapping(method = RequestMethod.PUT, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/save")
    public int save(@RequestBody OrganInfo entity) ;

    @RequestMapping(method = RequestMethod.PATCH, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/updateById")
    public int updateById(@RequestBody OrganInfo id);

    @RequestMapping(method = RequestMethod.GET, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/queryById/{id}")
    public  OrganInfo queryById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/deleteById/{id}")
    public int deleteById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.POST, value = "/ ${JAVA_BEAN_CAMEL_NAME_VARIABLE}/paginate")
    public Pager<OrganInfo> paginate( @RequestBody OrganInfo entity, Long pageSize, Long pageNum);
}
